#include <mockcpp/mockcpp.hpp>
#include <testngpp/testngpp.hpp>
#include <Probability.h>

USING_MOCKCPP_NS
USING_TESTNGPP_NS

FIXTURE(Probability)
{
	TEST(should be able to calc probability of A&B: EventsAPossibilty=0.1, EventsBPossibilty=0.2, result=0.02)
	{
		Probability probabilityA(0.1);
		Probability probabilityB(0.2);
		ASSERT_EQ(Probability(0.02), probabilityA and probabilityB);
	}

	TEST(should be able to calc probability of A or B: EventsAPossibilty=0.3, EventsBPossibilty=0.4, result=0.58)
	{
		Probability probabilityA(0.3);
		Probability probabilityB(0.4);
		ASSERT_EQ(Probability(0.58), probabilityA or probabilityB);
	}

	TEST(should be able to calc probability of not a event: EventsAPossibilty=0.4, result=0.6)
	{
		Probability probability(0.4);
		ASSERT_EQ(Probability(0.6), not probability);
	}
};

